﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="clr-namespace:WickedFlame.VecDraw.Base.Controls">

    <ResourceDictionary.MergedDictionaries>
        <ResourceDictionary Source="/VecDraw.Base;component/Resources/CtrlBrushes.xaml"/>
        <ResourceDictionary Source="/VecDraw.Base;component/Resources/Common.xaml"/>
    </ResourceDictionary.MergedDictionaries>
    
    <Style TargetType="{x:Type local:VecDrawDialog}">
        <Setter Property="Background" Value="#FFD8D8D8"/>
        <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
        <Setter Property="WindowStyle" Value="None" />
        <Setter Property="ShowInTaskbar" Value="False" />
        <Setter Property="ShowActivated" Value="False" />
        <Setter Property="AllowsTransparency" Value="true" />
        <Setter Property="Control.Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type local:VecDrawDialog}">
                    <Border BorderBrush="Black" 
                            BorderThickness="1"
                            CornerRadius="3,3,0,0" 
                            Background="#FF919191"
                            Name="windowBorder">
                        <Grid
                            Background="{TemplateBinding Background}">

                            <Grid.ColumnDefinitions>
                                <ColumnDefinition/>
                            </Grid.ColumnDefinitions>
                            <Grid.RowDefinitions>
                                <RowDefinition Height="Auto" />
                                <RowDefinition/>
                            </Grid.RowDefinitions>

                            <Grid x:Name="PART_Header" Grid.Row="0">

                                <Grid.RowDefinitions>
                                    <RowDefinition/>
                                </Grid.RowDefinitions>

                                <Border Name="undockedHeaderDark" 
                                        Grid.Row="0"
                                        Focusable="False" 
                                        BorderThickness="0,0,0,0" 
                                        BorderBrush="{StaticResource PaneHeaderDarkBrush}"
                                        Height="20" >
                                    <Border.Background>
                                        <LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
                                            <GradientStop Offset="0.0" Color="#505050" />
                                            <GradientStop Offset="1.0" Color="#282828" />
                                        </LinearGradientBrush>
                                    </Border.Background>
                                    <DockPanel HorizontalAlignment="Stretch" VerticalAlignment="Stretch" LastChildFill="True">

                                        <Button x:Name="PART_PinClose" Style="{StaticResource ButtonStyle}" DockPanel.Dock="Right" HorizontalAlignment="Right" VerticalAlignment="Center" Width="11" Height="11" BorderBrush="Transparent" Background="Transparent" Margin="0,0,2,0" >
                                            <Path StrokeThickness="3" Data="M 0,0 L6,6 M 0,6 L 6,0" Stroke="WhiteSmoke"/>
                                        </Button>

                                        <ContentControl Foreground="WhiteSmoke" Margin="4,0,0,1" ><!--FontWeight="Heavy"-->
                                            <ContentPresenter ContentSource="Title" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
                                        </ContentControl>
                                    </DockPanel>
                                </Border>

                            </Grid>

                            <ContentPresenter Grid.Row="1" Name="mainContent" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"/>

                        </Grid>
                    </Border>

                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    
</ResourceDictionary>